<%@ page language="java" contentType="text/html; charset=UTF-8"%>


<!---------------------------------------头部模块复用------------------------------------------>
<%@ include file="/res/FrontPage/PartialPageReferences/head.jsp" %>

<title>个人信息</title>


<!-- -----------------------------------正文开始--------------------------------------- -->
<% if(session.getAttribute("users") == null){ %>
<script type="text/javascript">
	alert("请先登录哦~~~");
	window.location="/Bank/WebPage/FrontPage/index.jsp";
</script>
<%}else{ %>
<section class="contact_page">
    <div class="container">
        <div class="row">
            <div class="col-sm-6 col-sm-offset-3 m-t-50">
                <h2 class="underline heading">个人信息中心</h2>
                <p class="text-center">在这里可以查看自己的信息，还能修改自己的信息。</p>
            </div>
        </div>
		
		<!-- -----------------------------------信息区域开始----------------------------------- -->
        <div class="row">
			<div class="col-xs-12 col-sm-6 section-top-30 wow fadeInRight" data-wow-duration="1s" data-wow-delay="0.2s">
                <div class="row contact_border">
                    <div class="contact_form">
                        <div class="form">
                        	<div class="col-xs-12"><h4 class="heading_left">银行卡号：
                            <%=((Users)session.getAttribute("users")).getZhanghao()%></h4></div>
                            <div class="col-xs-12"><h4 class="heading_left">姓名：
                            <%=((Users)session.getAttribute("users")).getXingming()%></h4></div>
                            <div class="col-xs-12"><h4 class="heading_left">邮箱：
                            <%=((Users)session.getAttribute("users")).getYouxiang()%></h4></div>
                            <div class="col-xs-12"><h4 class="heading_left">手机号：
                            <%=((Users)session.getAttribute("users")).getShoujihao()%></h4></div>
                            <div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
                            <div class="col-md-12 text-center section-bottom-15">
                                <button type="button" class="btn btn-success" onClick="javascript:xiugai()">前往修改信息</button>
                                <script type="text/javascript">
                                	function xiugai(){
										window.location="ModifyInformation.jsp";
									}
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        	<!-- -----------------------------------信息区域结束----------------------------------- -->
        
			<!-- -----------------------------------存取款信息开始----------------------------------- -->
			<div class="col-xs-12 col-sm-6 section-top-30 wow fadeInRight" data-wow-duration="1s" data-wow-delay="0.2s">
                <div class="row contact_border">
                    <div class="contact_form">
                        <div class="form">
                        	<div class="col-xs-12"><h4 class="heading_left">这里仅显示10条记录</h4></div>
                            <div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
                            <table border=’1’ cellspacing=’0’ cellpadding=’5’>
								<tr><th>存取款ID</th><th>类型(存款/取款)</th><th>操作金额</th><th>操作时间(年-月-日 时:分:秒)</th><th>账户余额</th></tr>
								<%
									DAO dao = new DAO();
									String sqlyujv = "select * from cunkuanqvkuan where name = '" + ((Users)session.getAttribute("users")).getZhanghao() + "'";
									ArrayList<CunQvKuan> list = new ArrayList<CunQvKuan>();
									CunQvKuan cunqv = new CunQvKuan();
									list = dao.chaxuncunqv(sqlyujv);
									Collections.reverse(list);
									int i = 0;
								%>
								<% for(CunQvKuan cq : list){ %>
								<% i++; %>
								<tr><td align="center" valign="middle"><%= cq.getId() %></td><td align="center" valign="center"><%= cq.getStyle() %></td><td align="center" valign="center"><%= cq.getMoney() %></td><td align="center" valign="center"><%= cq.getDate() %></td><td align="center" valign="center"><%= cq.getYue() %></td></tr>
								<% if(i>=10) break; %>
								<% } %>
							</table>
							<div class="col-xs-12"><h4 class="heading_left"> </h4></div>
							<div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
                            <div class="col-md-12 text-center section-bottom-15">
                                <button type="button" class="btn btn-success" onClick="javascript:chaxun()">点击前往查询详细信息</button>
                                <script type="text/javascript">
                                	function chaxun(){
										window.location="DepositAndWithdrawalQueries.jsp";
									}
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
		<!-- -----------------------------------存取款信息结束----------------------------------- -->
        <div class="row section-top-25">
            <div class="col-xs-12">
                <div class="map"></div>
            </div>
        </div>
    </div>
</section>
<%} %>
<!-- -----------------------------------正文结束--------------------------------------- -->

<!------------尾部顶端的两个角------------>
<div class="shape section-top-50"></div>
<!-----------------------------尾部页面复用------------------------------------->

<%@ include file="/res/FrontPage/PartialPageReferences/foot.jsp" %>